.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  grid-gap: 20px;
  padding: 10px;
  grid-auto-flow: dense;
  transition: max-height 0.5s ease-in-out, visibility 0.5s ease-in-out;
  overflow: hidden; /* To prevent contents from being shown when container height is 0 */
  max-height: 2000px; /* This should be larger than the height of your content */
}

.grid-item,
.smaller-grid-item,
.bigger-grid-item {
  background-color: #54525c;
  padding: 5px;
  border: 1px solid #6c6a75;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item {
  height: 380px;
}

.smaller-grid-item {
  height: 200px;
}

.bigger-grid-item {
  height: 405px;
}
.bigger-grid-item:hover,
.smaller-grid-item:hover,
.grid-item:hover {
  transform: scale(0.99);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
}

.image-container {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
  background-color: #333;

  border-radius: 3px;
}

.image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: fill;
}

.text-content {
  margin-top: 10px;
}

.image-title {
  margin-bottom: 7px;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-info {
  font-size: 14px;
  margin-bottom: 10px;
  white-space: normal;
  word-wrap: break-word;
}

.action-button {
  background-color: #4caf50;
  border: none;
  color: white;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  padding: 8px 16px;
  margin-right: 5px;
  margin-bottom: 3px;
  cursor: pointer;
  border-radius: 4px;
}

.tooltip-grid {
  opacity: 0;
  position: absolute;
  top: 150px; /* Adjust this value according to your desired tooltip position */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(65, 64, 64, 0.75);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  z-index: 10;
  transition: top 1s ease, opacity 0.3s ease;
}

.grid-item:hover .tooltip-grid {
  opacity: 1;
  top: 250px;
}

.smaller-grid-item:hover .tooltip-grid {
  opacity: 1;
  top: 220px;
}

.tiny-grid-item {
  background-color: #54525c;
  padding: 10px;
  border: 1px solid #6c6a75;
  font-family: Arial, sans-serif;
  height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  border-radius: 5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item-name {
  height: 50px;
  left: 25%;
  top: -3%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
  position: absolute;
}

.item-name {
  font-weight: bold;
  font-size: 16px;
}

.item-description {
  font-size: 12px;
}

.special-grid-item {
  height: 380px;
  display: grid;
  background-color: #54525c;
  grid-template-columns: 15% 5% 80%;
  padding: 5px;
  border: 1px solid #6c6a75;
  font-family: Arial, sans-serif;
  flex-direction: column;
  position: relative;
  border-radius: 5px;
}

.button-section {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.text-section {
  grid-template-rows: 50% 5% 45%;
  height: 90%;
  margin-top: 27px;
  max-height: 90%;
}

.list-section {
  overflow-y: auto;
  height: 50%;
  max-height: 180px;
}

.tooltip-section {
  background-color: #222c37;
  padding-left: 8px;
  padding-top: 8px;
  border-radius: 4px;
  height: 45%;
  margin-top: 10px;
  max-height: 200px;
  overflow: auto;
}

.list-item {
  position: relative;
  border-bottom: 1px solid #6c6a75;
  padding-left: 5px;
  cursor: pointer;
}

.list-button {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #4caf50;
  border: none;
  color: white;
  text-align: center;
  padding: 10px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.list-button:hover {
  background-color: #45a049;
}

[data-lang="js"] {
  background-color: #cebd3b;
}

[data-lang="js"]:hover {
  background-color: #a3962f;
}

[data-lang="py"] {
  background-color: #3776ab;
}

[data-lang="py"]:hover {
  background-color: #2b5e88;
}

[data-lang="unity"] {
  background-color: #222c37;
}

[data-lang="unity"]:hover {
  background-color: #141a20;
}

[data-lang="cpp"] {
  background-color: #00599c;
}

[data-lang="cpp"]:hover {
  background-color: #014a81;
}

[data-lang="rust"] {
  background-color: #f38748;
}

[data-lang="rust"]:hover {
  background-color: #c56f3d;
}
